package com.icedevcloud.upms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.icedevcloud.upms.entity.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author XiaoBingBy
 * @since 2023-08-13
 */
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     * 根据用户Id 获取权限
     *
     * @param userId
     * @return
     */
    List<SysPermission> selectUserPermissionByUserId(@Param("userId") long userId);

    /**
     * 根据用户Id 获取权限编码
     *
     * @param userId
     * @return
     */
    List<String> selectUserPermCodeByUserId(@Param("userId") Long userId);


}
